ModerationViewModel

open class ModerationViewModel : BaseViewModel

ViewModel preparing and managing data related with the moderation for a channel since 3.0.0

Constructors

Link copied to clipboard
open fun ModerationViewModel(@NonNull channelUrl: String)
Constructor

Functions

Link copied to clipboard
open fun authenticate(@NonNull handler: AuthenticateHandler)
Tries to connect Sendbird Server and retrieve a channel instance.
Link copied to clipboard
open fun freezeChannel()
Freezes the channel.
Link copied to clipboard
open fun getFrozenStateChanges(): LiveData<BaseChannel>
Returns LiveData that can be observed if the channel has been frozen.
Link copied to clipboard
open fun getIsBanned(): LiveData<Boolean>
Returns LiveData that can be observed whether the current user is banned.
Link copied to clipboard
open fun getIsChannelDeleted(): LiveData<String>
Returns LiveData that can be observed if the channel has been deleted.
Link copied to clipboard
open fun getIsShowLoadingDialog(): LiveData<Boolean>
Returns LiveData that can be observed if the loading dialog is showing.
Link copied to clipboard
open fun getMyMemberStateChanges(): LiveData<MemberState>
Returns LiveData that can be observed if the state of the current user is changed.
Link copied to clipboard
open fun getMyRoleChanges(): LiveData<Role>
Returns LiveData that can be observed if the role of the current user is changed.
Link copied to clipboard
protected open fun onCleared()
Link copied to clipboard
open fun unfreezeChannel()
Unfreezes the channel.

Properties

Link copied to clipboard
open val channel: GroupChannel
Link copied to clipboard
@get:NonNull
val channelUrl: String